/**
* <p>Title: Course</p>
* <p>Description: CS343 Project</p>
* @author Derek Meisner
* @author Conor Lauer
* @author Derek Thompson
* @email meis0056@umn.edu
* @email conor.lauer@my.uwrf.edu
* @email derek.thompson-1@my.uwrf.edu
* @date 11/14/2012
* @team Derek, Conor, Derek
*/

package golfScore;

import java.util.ArrayList;
import java.util.List;

public class Course {

	private float rating;
	private int slope;
	private String courseName;
	List<Hole> holes = new ArrayList<Hole>();
	
	/**
	   * getHoles
	   * @require
	   * @ensure
	   */
	public List<Hole> getHoles() {
		return holes;
	}
	
	/**
	   * constructor
	   * @require courseName <> null
	   * @ensure
	   */
	public Course(String courseName){
		this.setCourseName(courseName);
	}
	
	/**
	   * constructor
	   * @require courseName <> null, rating float, slope int
	   * @ensure
	   */
	public Course(String courseName, float rating, int slope){
		this.setCourseName(courseName);
		this.setRating(rating);
		this.setSlope(slope);
	}

	/**
	   * getRating
	   * @require
	   * @ensure
	   */
	public float getRating() {
		return rating;
	}

	/**
	   * setRating
	   * @require
	   * @ensure
	   */
	public void setRating(float rating) {
		this.rating = rating;
	}

	/**
	   * getSlope
	   * @require
	   * @ensure
	   */
	public int getSlope() {
		return slope;
	}
	
	/**
	   * setSlope
	   * @require
	   * @ensure
	   */
	public void setSlope(int slope) {
		this.slope = slope;
	}

	/**
	   * getCourseName
	   * @require
	   * @ensure
	   */
	public String getCourseName() {
		return courseName;
	}
	
	public void setCourseName(String courseName){
		this.courseName = courseName;
	}
	
	/**
	   * addHole
	   * @require
	   * @ensure
	   */
	public void addHole(int dist, int par, String holeHead, int holeVal, int handicap){
		//Adds new holes to holes list in the course
		holes.add(new Hole(dist, par, holeHead, holeVal, handicap));
	}
}
